package com.example.companybusiness.operationt.bean;

import android.content.Context;
import android.webkit.JavascriptInterface;
import android.widget.Toast;

public class JSInterfaceBean
{
    private Context mContex;

    public JSInterfaceBean(Context mContex)
    {
        this.mContex = mContex;
    }

    //提供给JavaScript访问的方法，必须添加@JavaScriptInterface注解
    @JavascriptInterface
    public void showToast(String msg)
    {
        Toast.makeText(mContex, msg, Toast.LENGTH_SHORT).show();
    }
}
